# Use an official Golang runtime as a parent image
FROM golang:1.20

# Create a Directory inside the container to store all our application and then make it the working directory.
RUN mkdir -p /smebxyz/golang/websocket-cluster/internal/handlerwebsocket、

# COPY the directory contents into the container at /app
COPY ./handlerwebsocket /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/handlerwebsocket

COPY ./config.yaml /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/config.yaml

COPY ./admin /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/admin
# RUn Command
RUN chmod a+x  /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/handlerwebsocket
RUN chmod a+x  /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/config.yaml
RUN chmod 777 -R  /smebxyz/golang/websocket-cluster/internal/handlerwebsocket/admin

# Set the environment variable for the port
EXPOSE 7001

EXPOSE 7002

EXPOSE 7003 

EXPOSE 7004
# Run the executable
CMD ["/smebxyz/golang/websocket-cluster/internal/handlerwebsocket/handlerwebsocket"]
